package com.buba.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;


/**
 * 菜单实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Menu implements Comparable<Menu>, Serializable {
    private Integer menuId;
    private String menuName;
    private String menuUrl;
    private Integer menuPid;
    private boolean open = false;
    private boolean checked = false;


    @Override
    public int compareTo(Menu o) {
        if(this.getMenuId() > o.getMenuId()){
            return 1;
        }
        if(this.getMenuId() < o.getMenuId()){
            return -1;
        }
        return 0;
    }
}
